/********************************************************************
        created:        2009/12/12
        filename:       htl_construct.h
        author:         HongLiang

        purpose:    	construct
*********************************************************************/
#ifndef __HTL_CONSTRUCT__
#define __HTL_CONSTRUCT__
#include <new.h>
#include "htl_config.h"
__HTL_BEGIN_NAMESPACE
template<typename T, typename VALUE>
inline void construct(T* p, const VALUE& value) {
    new (p) T(value);
}

template<typename T>
inline void destory(T* p) {
    p->~T();
}

template<typename ForwardIterator>
inline void destory(ForwardIterator first, ForwardIterator last) {
    for (; first < last; ++first)
        destory(&*first);
}
__HTL_END_NAMESPACE
#endif
